package gr.takeda.rhythmguitar.data;

import java.nio.charset.Charset;

import org.apache.log4j.Logger;

public class EncryptionHandler {

	protected static final Logger logger = Logger.getLogger(EncryptionHandler.class);

	public static String encode(String message) {
		return javax.xml.bind.DatatypeConverter.printBase64Binary(message.getBytes(Charset.forName("UTF-8")));
	}

	public static String decode(String message) {
		return new String(javax.xml.bind.DatatypeConverter.parseBase64Binary(message), Charset.forName("UTF-8"));
	}

}
